FutAwayTktGateway
FutAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools. Replaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.
METADATA
Attribute | Value |
---|---|
Topic | 5120-srse-gateway |
MLink Token | Internal |
Product | SRTrade |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | |
clientFillID | BIGINT | PRI | 0 | client execution ID these must be unique on a peraccount basis copied into SpdrParentExecutionaltFillId |
clientFirm | VARCHAR(16) | PRI | '' | |
clientOrderID | VARCHAR(24) | '' | client orderID copied into SpdrParentExecutionaltOrderId | |
riskGroupId | CHAR(19) | '0000-0000-0000-0000' | Default 0 none Required to be nonzero if incorporating risk into an existing riskGroupId | |
fkey_at | enum - AssetType | 'None' | ||
fkey_ts | enum - TickerSrc | 'None' | ||
fkey_tk | VARCHAR(12) | '' | ||
fkey_yr | SMALLINT UNSIGNED | 0 | ||
fkey_mn | TINYINT UNSIGNED | 0 | ||
fkey_dy | TINYINT UNSIGNED | 0 | ||
fillSide | enum - BuySell | 'None' | ||
fillPrice | DOUBLE | 0 | ||
fillQuantity | INT | 0 | ||
fillRefUPrc | DOUBLE | 0 | reference underlier price fill arrival time | |
deliverExecReport | enum - YesNo | 'No' | Drop a copy of the execution report | |
SRfillID | BIGINT | 0 | SR internal fill number any values submitted will be overwritten by the SR generated fill number | |
comment | VARCHAR(64) | '' | text comment if any | |
execBrkr | VARCHAR(12) | '' | client external exec broker code | |
userData1 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
userData2 | TINYTEXT | '' | client supplied data field passes through to parent and child executions and reports as well as FIX drops | |
strategy | VARCHAR(36) | '' | clientsupplied strategy string | |
fillDttm | DATETIME(6) | '1990-01-01' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
checksum | TINYINT UNSIGNED | 0 | Must be set to 13 This helps detect some columnvalue misalignments |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
clientFillID | 2 |
clientFirm | 3 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRTrade`.`MsgFutAwayTktGateway` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'client execution ID, these must be unique on a per-account basis [copied into SpdrParentExecution.altFillId]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`clientOrderID` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'client orderID [copied into SpdrParentExecution.altOrderId]',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'Default: 0 (none). Required to be non-zero if incorporating risk into an existing riskGroupId',
`fkey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`fkey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`fkey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`fkey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`fillSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`fillPrice` DOUBLE NOT NULL DEFAULT 0,
`fillQuantity` INT NOT NULL DEFAULT 0,
`fillRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'reference underlier price @ fill arrival time',
`deliverExecReport` ENUM('Yes','No') NOT NULL DEFAULT 'No' COMMENT 'Drop a copy of the execution report',
`SRfillID` BIGINT NOT NULL DEFAULT 0 COMMENT 'SR internal fill number, any values submitted will be overwritten by the SR generated fill number',
`comment` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'text comment (if any)',
`execBrkr` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'client (external) exec broker code',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client-supplied strategy string',
`fillDttm` DATETIME(6) NOT NULL DEFAULT '1990-01-01',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`checksum` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Must be set to 13. This helps detect some column,value misalignments.',
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`accnt`,`clientFillID`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='FutAwayTktGateway inserts are validated and convered to away SpdrParentExecution records and published. If successfully published they will be visible in the SpdrParentExecution table and on SpiderRock GUI tools.\nReplaces are allowed but they are functionally identical to updates in that only the fillPrice and fillQuantity fields are actually changed.';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`clientFillID`,
`clientFirm`,
`clientOrderID`,
`riskGroupId`,
`fkey_at`,
`fkey_ts`,
`fkey_tk`,
`fkey_yr`,
`fkey_mn`,
`fkey_dy`,
`fillSide`,
`fillPrice`,
`fillQuantity`,
`fillRefUPrc`,
`deliverExecReport`,
`SRfillID`,
`comment`,
`execBrkr`,
`userData1`,
`userData2`,
`strategy`,
`fillDttm`,
`timestamp`,
`checksum`
FROM `SRTrade`.`MsgFutAwayTktGateway`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRTrade`.`MsgFutAwayTktGateway`
SET
/* Replace with a VARCHAR(24) */
`clientOrderID` = 'Example_clientOrderID',
/* Replace with a CHAR(19) */
`riskGroupId` = 'Example_riskGroupId',
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`fkey_at` = 'None',
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`fkey_ts` = 'None',
/* Replace with a VARCHAR(12) */
`fkey_tk` = 'Example_fkey_tk',
/* Replace with a SMALLINT UNSIGNED */
`fkey_yr` = 123,
/* Replace with a TINYINT UNSIGNED */
`fkey_mn` = 1,
/* Replace with a TINYINT UNSIGNED */
`fkey_dy` = 1,
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide` = 'None',
/* Replace with a DOUBLE */
`fillPrice` = 4.56,
/* Replace with a INT */
`fillQuantity` = 5,
/* Replace with a DOUBLE */
`fillRefUPrc` = 4.56,
/* Replace with a ENUM('Yes','No') */
`deliverExecReport` = 'No',
/* Replace with a BIGINT */
`SRfillID` = 1234567890,
/* Replace with a VARCHAR(64) */
`comment` = 'Example_comment',
/* Replace with a VARCHAR(12) */
`execBrkr` = 'Example_execBrkr',
/* Replace with a TINYTEXT */
`userData1` = 'dummy tiny text',
/* Replace with a TINYTEXT */
`userData2` = 'dummy tiny text',
/* Replace with a VARCHAR(36) */
`strategy` = 'Example_strategy',
/* Replace with a DATETIME(6) */
`fillDttm` = '2022-01-01 12:34:56.000000',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYINT UNSIGNED */
`checksum` = 1
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRTrade`.`MsgFutAwayTktGateway`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a BIGINT */
`clientFillID`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a VARCHAR(24) */
`clientOrderID`,
/* Replace with a CHAR(19) */
`riskGroupId`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`fkey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`fkey_ts`,
/* Replace with a VARCHAR(12) */
`fkey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`fkey_yr`,
/* Replace with a TINYINT UNSIGNED */
`fkey_mn`,
/* Replace with a TINYINT UNSIGNED */
`fkey_dy`,
/* Replace with a ENUM('None','Buy','Sell') */
`fillSide`,
/* Replace with a DOUBLE */
`fillPrice`,
/* Replace with a INT */
`fillQuantity`,
/* Replace with a DOUBLE */
`fillRefUPrc`,
/* Replace with a ENUM('Yes','No') */
`deliverExecReport`,
/* Replace with a BIGINT */
`SRfillID`,
/* Replace with a VARCHAR(64) */
`comment`,
/* Replace with a VARCHAR(12) */
`execBrkr`,
/* Replace with a TINYTEXT */
`userData1`,
/* Replace with a TINYTEXT */
`userData2`,
/* Replace with a VARCHAR(36) */
`strategy`,
/* Replace with a DATETIME(6) */
`fillDttm`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYINT UNSIGNED */
`checksum`
)
VALUES(
'Example_accnt',
1234567890,
'Example_clientFirm',
'Example_clientOrderID',
'Example_riskGroupId',
'None',
'None',
'Example_fkey_tk',
123,
1,
1,
'None',
4.56,
5,
4.56,
'No',
1234567890,
'Example_comment',
'Example_execBrkr',
'dummy tiny text',
'dummy tiny text',
'Example_strategy',
'2022-01-01 12:34:56.000000',
'2022-01-01 12:34:56.000000',
1
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRTrade`.`MsgFutAwayTktGateway`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a BIGINT */
`clientFillID` = 1234567890
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='FutAwayTktGateway' ORDER BY ordinal_position ASC;